<!--#include file="CheckSession.asp"-->
<!--#include file="../inc/PublicFun.Asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    <title>�ޱ����ĵ�</title>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" charset="utf-8" src="../webedit/kindeditor.js"></script>
    <script type="text/javascript">
        KE.show({
            id: 'TxtMemberContent',
            imageUploadJson: '../../upload_json.asp',
            fileManagerJson: '../../file_manager_json.asp',
            allowFileManager: true,
            afterCreate: function (id) {
                KE.event.ctrl(document, 13, function () {
                    KE.util.setData(id);
                    document.forms['form1'].submit();
                });
                KE.event.ctrl(KE.g[id].iframeDoc, 13, function () {
                    KE.util.setData(id);
                    document.forms['form1'].submit();
                });
            }
        });
    </script>


</head>

<body>
<%
strAction = trim(request("Action"))
	strMemberId = trim(request("Id"))
	
	IF Request("Action") = "s" Then
	'�޸�
		Set Rs=Server.CreateObject("Adodb.RecordSet")
			sql="select * from xy_phone where Id="&strMemberId&""
			rs.open sql,conn,1,3
			Rs("loginname")=Trim(Request("TxtMemberName"))
			Rs("password")=Trim(Request("TxtMemberPwd"))	
			Rs("aliasName")=Trim(Request("realname"))
			Rs("phone")=Trim(Request("TxtMemberTel"))
			Rs("email")=Trim(Request("umail"))	
			Rs("amount")=Trim(Request("question"))
			Rs("partner")=Trim(Request("TxtMemberContent"))
						
			Rs.Update	
		Rs.Close()
		Set Rs=Nothing
		response.Write("<script language='javascript'>alert('�޸ĳɹ�������');window.location.href='Admin_userEdit . asp ? Action = e & Id = "&strMemberId&"'</script>")
	End IF
	
	IF Request("Action")="e" Then
	'�޸�
		Set Rs = Server . CreateObject("Adodb.RecordSet")
			sql = "select * from xy_phone where Id=" & strMemberId & ""
			Rs . open sql,Conn,1,3
			IF Not(Rs . Eof and Rs . Bof) Then
				strMemberName = Rs("loginname")
				strMemberPwd = Rs("password")
				strMemberTel = Rs("phone")
				strMemberContent = Rs("partner")
				
				
				question = Rs("amount")
				realname = Rs("aliasName")
				umail = Rs("email")
				strTimes = Rs("times")
			End If
	End If			
	
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td height="50" align="center" class="title">��Ա��Ϣ</td>
    </tr>
</table>
<div>&nbsp;</div>
<table width="100%" border="1" align="center" cellpadding="5" cellspacing="0" style="border-collapse:collapse">
    <form action="?action=s&Id=<%= strMemberId %>" method="post" name="form1">
        <tr>
            <td width="150" align="right" nowrap>�����˺ţ�</td>
            <td nowrap><input name="TxtMemberName" type="text" class="inputtext" id="TxtMemberName" style="width:300px"
                              value="<%= strMemberName %>" maxlength="50"></td>
        </tr>
        <tr>
            <td align="right" nowrap>���룺</td>
            <td valign="top" nowrap><input name="TxtMemberPwd" type="text" class="inputtext" id="TxtMemberPwd"
                                           style="width:300px" value="<%= strMemberPwd %>" maxlength="50"></td>
        </tr>
        <tr>
            <td align="right" nowrap>��ʵ����</td>
            <td valign="top" nowrap><input name="realname" type="text" class="inputtext" id="realname"
                                           style="width:300px" value="<%= realname %>" maxlength="50"></td>
        </tr>

        <tr>
            <td align="right" nowrap>�ֻ�ţ�</td>
            <td valign="top" nowrap><input name="TxtMemberTel" type="text" class="inputtext" id="TxtMemberTel"
                                           style="width:300px" value="<%= strMemberTel %>" maxlength="50"></td>
        </tr>


        <tr>
            <td align="right" nowrap>�������䣺</td>
            <td valign="top" nowrap><input name="umail" type="text" class="inputtext" id="umail" style="width:300px"
                                           value="<%= umail %>" maxlength="50"></td>
        </tr>

        <tr>
            <td align="right" nowrap>QQ�ţ�</td>
            <td valign="top" nowrap><input name="question" type="text" class="inputtext" id="question"
                                           style="width:300px" value="<%= question %>" maxlength="50"></td>
        </tr>

        <tr>
            <td align="right" nowrap>��ע��</td>
            <td valign="top" nowrap>
                <textarea id="TxtMemberContent" name="TxtMemberContent"
                          style="height:200px; width:99%"><%= strMemberContent %></textarea>
            </td>
        </tr>
        <tr>
            <td align="right" nowrap>ע��ʱ�䣺</td>
            <td valign="top" nowrap><%= strTimes %></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><input name="submit1" type="submit" class="button"
                       value="ȷ���ύ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="reset" type="reset" class="button"
                                                                                value="ȡ����д"></td>
        </tr>
    </form>
</table>
</body>
</html>
